<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	<style type="text/css">
		#hd{
			width: 80%;
			height: 600px;
			border: 4px solid mediumpurple;
			margin: 0px auto;
			background: url(dog.jpg) no-repeat;
			/*background-size: 200px 300px;*/
			/*background-size: 200px;*/
			/*background-size: 100% 100%;*/
			/*cover会让宽度变为100%,高度等比例缩放*/
			/*background-size: cover;*/
			/*contain会让高度变为100%,宽度等比例缩放*/
			/*background-size: contain;*/
		}
	</style>
	</head>
	<body>
		<div id="hd">
			
			
		</div>
		
		
	</body>
</html>
